#include "ourhdr.h"
#include "fat32.h"

void recover_fat32(const char*device){
	printf("Recovering pre_alloc structures on device: %s...\n", device);
	struct filsys_fat32 *dosfs = (struct filsys_fat32*)malloc(sizeof(struct filsys_fat32));
	if(!dosfs)
		err_sys("malloc error");
	init_struct_fat32(device, dosfs);
	format_fat32(dosfs);
	pre_allocation_fat32(dosfs);
	printf("Recover finished.\n");
	free(dosfs);
}
